{ Statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=275
  Verdict: Accepted
}
uses
	SysUtils, Math;
 
var  	
	x, y, x1, y1, x2, y2 : longint;
 
function vect(x1, x2, y1, y2 : longint) : longint;
begin
	result := x1 * y2 - x2 * y1;
end;
 
function scal(x1, y1, x2, y2 : longint) : longint;
begin
	result := x1 * x2 + y1 * y2;
end;
 
begin
	reset(input,'input.txt');
	rewrite(output,'output.txt');
	read(x, y, x1, y1, x2, y2);
	if (vect(x2 - x1, y2 - y1, x - x1, y - y1) = 0) and (scal(x2 - x1, y2 - y1, x - x1, y - y1) >= 0) then write('YES') else write('NO');
end.